﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace PJ.Data
{
    [Serializable]
    [DataContract]
    public abstract class BaseItemData : BaseEntityData, IItemData
    {
        private string m_Name;

        [DataMember]
        public string Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }
        protected BaseItemData()
        {
        }
        protected BaseItemData(IItemData data)
            : base(data)
        {
        }
        public override IObjectData Copy(IObjectData data)
        {
            base.Copy(data);
            this.Name = ((IItemData)data).Name;
            return this;
        }
        public override bool IsEqual(IObjectData data)
        {
            if (base.IsEqual(data))
                if (((IItemData)data).Name == this.Name)
                    return true;
            return false;
        }


    }
}
